/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2302 - Ex2
 * <p>Powered by webrx On 2023-06-12 17:19:46
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex2 {
    public static void main(String[] args) {
        long ss = System.currentTimeMillis();
        int sum = 0;
        int ok = 100;
        for (int i = 1; i <= ok; i++) {
            sum += i;
        }
        System.out.printf("1+2+3+...+%d=%d%n", ok, sum);
        long ee = System.currentTimeMillis();
        System.out.println();
        System.out.println(ee - ss);


    }
}
